< previous page page_610 next page >

Page 610
If you double-click the Custom property in the Properties window of the ImageList control, youll see a form similar to the one shown in Figure 30.2.
8160-0610a.gif
Figure 30.2
The property pages of the ImageList control.
In Figure 30.2, you can see that Ive loaded flag images of several countries. I set the Key property of each picture in the ImageList to a unique value and created a description of each image in their respective Tag properties. Also, youll see the following code in each of the command buttons that loop through the images:
9f31265bb40b592b1929e18a47ab28e5.gif
Private Sub cmdNext_Click()
   Set imgFlag.Picture = _
       ilsFlags.ListImages(mintIndex).Picture
   mintIndex = mintIndex + 1
   If mintIndex > ilsFlags.ListImages.Count Then
      mintIndex = 1
   End If
End Sub

Private Sub cmdPrev_Click()
   Set imgFlag.Picture = _
       ilsFlags.ListImages(mintIndex).Picture
   mintIndex = mintIndex - 1
   If mintIndex = 0 Then
      mintIndex = ilsFlags.ListImages.Count
   End If
End Sub

 
< previous page page_610 next page >

If you like this book, buy it!